// 防抖函数
export function debounce (fn:any, delay:number) {
    let timer:any
    return function () {
      if (timer) {
        clearTimeout(timer)
      }
      timer = setTimeout(() => {
        fn()
      }, delay)
    }
  }
